package cn.thinkluck.pattern.command;

/**
 * 开灯命令
 * @Author liutao
 * @DateTime 2024/8/4 下午3:48
 */
public class LightOnCommandImpl implements Command {
    /**
     * 持有命令接收者
     * 灯对象
     */
    private Light light;
    public LightOnCommandImpl(Light light) {
        this.light = light;
    }
    @Override
    public void execute() {
        light.on();
    }
}
